﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Xml;
using COP.Extensions;


namespace COP.Extractors
{
    public class XMLExtractor : IExtractor
    {
        public IEnumerable ExtractSource(IEnumerable sourceData)
        {
            return ((XmlNode)sourceData).ChildNodes;
        }

        public string ExtractKey(object valNode, bool IsKeyMandate)
        {
            return ((XmlNode)valNode).GetAttributeValue(Constant.Config.Key, IsKeyMandate);

        }
    }

}
